package com.sky.service.impl;

import com.sky.entity.SetmealDishEntity;
import com.sky.mapper.SetmealDishMapper;
import com.sky.service.SetmealDIshService;
import com.sky.vo.SetmealDishWithUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SetmealDishServiceImpl implements SetmealDIshService {

    @Autowired
    private SetmealDishMapper setmealDishMapper;

    @Override
    public List<SetmealDishEntity> getBySetmealId(Integer setmealId) {
        List<SetmealDishEntity> list = setmealDishMapper.getBySetmealId(setmealId);
        return list;
    }

    @Override
    public List<SetmealDishWithUserVO> getBySetmealIdWithUser(Integer setmealId) {
        return setmealDishMapper.getBySetmealIdWithUser(setmealId);
    }


    @Override
    public void saveBatch(List<SetmealDishEntity> entities) {
        setmealDishMapper.saveBatch(entities);
    }
}
